import req from '@/http/http'
import {getServer} from '@/http/AppApi'

let ZHPQ_SERVER = getServer()

// 社会治安

// 命案防控
// 修改
export const updateHomicide = data => {
  let path = ZHPQ_SERVER + '/homicide/' + data.id
  return req.put(path, data)
}
// 删除
export const delHomicide = data => {
  let path = ZHPQ_SERVER + '/homicide/' + data.id
  return req.delete(path)
}
// 获取 查询 分页
export const getHomicide = param => {
  let path = ZHPQ_SERVER + '/homicide'
  return req.get(path, param)
}
// 获取list
export const getHomicideList = param => {
  let path = ZHPQ_SERVER + '/homicide/list'
  return req.get(path, param)
}
// 新增
export const createHomicide = data => {
  let path = ZHPQ_SERVER + '/homicide/'
  return req.post(path, data)
}

// 重特大案件
// 修改
export const updateImptntCas = data => {
  let path = ZHPQ_SERVER + '/imptntCas/' + data.id
  return req.put(path, data)
}
// 删除
export const delImptntCas = data => {
  let path = ZHPQ_SERVER + '/imptntCas/' + data.id
  return req.delete(path)
}
// 获取 查询 分页
export const getImptntCas = param => {
  let path = ZHPQ_SERVER + '/imptntCas'
  return req.get(path, param)
}
// 新增
export const createImptntCas = data => {
  let path = ZHPQ_SERVER + '/imptntCas/'
  return req.post(path, data)
}
// 单条记录
export const getImptntCasDetail = data => {
  let path = ZHPQ_SERVER + '/imptntCas/' + data.id
  return req.get(path)
}

// 寄递物流安全信息
// 修改
export const updateLogistics = data => {
  let path = ZHPQ_SERVER + '/logistics/' + data.id
  return req.put(path, data)
}
// 删除
export const delLogistics = data => {
  let path = ZHPQ_SERVER + '/logistics/' + data.id
  return req.delete(path)
}
// 获取 查询 分页
export const getLogistics = param => {
  let path = ZHPQ_SERVER + '/logistics'
  return req.get(path, param)
}
// 新增
export const createLogistics = data => {
  let path = ZHPQ_SERVER + '/logistics/'
  return req.post(path, data)
}

// 重点地区排查整治
// 修改
export const updateImportantArea = data => {
  let path = ZHPQ_SERVER + '/importantArea/' + data.id
  return req.put(path, data)
}
// 删除
export const delImportantArea = data => {
  let path = ZHPQ_SERVER + '/importantArea/' + data.id
  return req.delete(path)
}
// 获取 查询 分页
export const getImportantArea = param => {
  let path = ZHPQ_SERVER + '/importantArea'
  return req.get(path, param)
}
// 新增
export const createImportantArea = data => {
  let path = ZHPQ_SERVER + '/importantArea/'
  return req.post(path, data)
}

// 命案嫌疑人
// 修改
export const updateHomicideSuspect = data => {
  let path = ZHPQ_SERVER + '/homicideSuspect/' + data.id
  return req.put(path, data)
}
// 删除
export const delHomicideSuspect = data => {
  let path = ZHPQ_SERVER + '/homicideSuspect/' + data.id
  return req.delete(path)
}
// 获取 查询 分页
export const getHomicideSuspect = param => {
  let path = ZHPQ_SERVER + '/homicideSuspect'
  return req.get(path, param)
}
// 新增
export const createHomicideSuspect = data => {
  let path = ZHPQ_SERVER + '/homicideSuspect/'
  return req.post(path, data)
}
// 根据ID查看详情
export const getHomicideSuspectDetail = id => {
  let path = ZHPQ_SERVER + '/homicideSuspect/' + id
  return req.get(path)
}
// 新增窗口 案件编号 下拉数据选择
export const caseNumber = param => {
  let path = ZHPQ_SERVER + '/homicideSuspect/' + param
  return req.get(path)
}

// 命案受害人
// 修改
export const updateVictim = data => {
  let path = ZHPQ_SERVER + '/victim/' + data.id
  return req.put(path, data)
}
// 删除
export const delVictim = data => {
  let path = ZHPQ_SERVER + '/victim/' + data.id
  return req.delete(path)
}
// 获取 查询 分页
export const getVictim = param => {
  let path = ZHPQ_SERVER + '/victim'
  return req.get(path, param)
}
export const getVictimById = id => {
  let path = ZHPQ_SERVER + '/victim/' + id
  return req.get(path)
}
// 新增
export const createVictim = data => {
  let path = ZHPQ_SERVER + '/victim/'
  return req.post(path, data)
}
